home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Arsenal / OS2 Arsenal v1.0 (Disc 2)(Arsenal Computer).ISO / os2_inet / progcsd.exe / RESOLV.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-12  |  3.9 KB  |  82 lines

  1. /********************************************************copyrite.xmc***/
  2. /*                                                                     */
  3. /*   Licensed Materials - Property of IBM                              */
  4. /*                                                                     */
  5. /*   This module is "Restricted Materials of IBM":                     */
  6. /*      Program Number:   5798RXW                                      */
  7. /*      Program Name:     IBM TCP/IP Version 1.2 for OS/2              */
  8. /*   (C) Copyright IBM Corporation. 1990, 1991.                        */
  9. /*                                                                     */
  10. /*   See IBM Copyright Instructions.                                   */
  11. /*                                                                     */
  12. /********************************************************copyrite.xmc***/
  13. /*
  14.  * Copyright (c) 1983, 1987 The Regents of the University of California.
  15.  * All rights reserved.
  16.  *
  17.  * Redistribution and use in source and binary forms are permitted
  18.  * provided that the above copyright notice and this paragraph are
  19.  * duplicated in all such forms and that any documentation,
  20.  * advertising materials, and other materials related to such
  21.  * distribution and use acknowledge that the software was developed
  22.  * by the University of California, Berkeley.  The name of the
  23.  * University may not be used to endorse or promote products derived
  24.  * from this software without specific prior written permission.
  25.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  26.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  27.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  28.  *
  29.  *      @(#)resolv.h    5.6 (Berkeley) 9/20/88
  30.  */
  31.  
  32. /*
  33.  * Global defines and variables for resolver stub.
  34.  */
  35. #ifndef __32BIT__
  36. #define _Packed
  37. #define _Seg16
  38. #define _Far16
  39. #define _Cdecl
  40. #endif
  41. #define MAXNS           3               /* max # name servers we'll track */
  42. #define MAXDNSRCH       3               /* max # default domain levels to try */
  43. #define LOCALDOMAINPARTS 2              /* min levels in name that is "local" */
  44.  
  45. #define RES_TIMEOUT     4               /* seconds between retries */
  46.  
  47. _Packed struct state {
  48.         short     retrans;                /* retransmition time interval */
  49.         short     retry;                  /* number of times to retransmit */
  50.         long    options;                /* option flags - see below. */
  51.         short     nscount;                /* number of name servers */
  52.         struct  sockaddr_in nsaddr_list[MAXNS]; /* address of name server */
  53. #define nsaddr  nsaddr_list[0]          /* for backward compatibility */
  54.         u_short id;                     /* current packet id */
  55.         char    defdname[MAXDNAME];     /* default domain */
  56.         char    * _Seg16 dnsrch[MAXDNSRCH+1];   /* components of domain to search */
  57. };
  58.  
  59. /*
  60.  * Resolver options
  61.  */
  62. #define RES_INIT        0x0001          /* address initialized */
  63. #define RES_DEBUG       0x0002          /* print debug messages */
  64. #define RES_AAONLY      0x0004          /* authoritative answers only */
  65. #define RES_USEVC       0x0008          /* use virtual circuit */
  66. #define RES_PRIMARY     0x0010          /* query primary server only */
  67. #define RES_IGNTC       0x0020          /* ignore trucation errors */
  68. #define RES_RECURSE     0x0040          /* recursion desired */
  69. #define RES_DEFNAMES    0x0080          /* use default domain name */
  70. #define RES_STAYOPEN    0x0100          /* Keep TCP socket open */
  71. #define RES_DNSRCH      0x0200          /* search up local domain tree */
  72.  
  73. #define RES_DEFAULT     (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  74.  
  75. extern _Packed struct state _res;
  76. #if 0
  77. extern char * _Seg16 _Far16 _Cdecl p_cdname();
  78. extern char * _Seg16 _Far16 _Cdecl p_rr();
  79. extern char * _Seg16 _Far16 _Cdecl p_type();
  80. extern char * _Seg16 _Far16 _Cdecl p_class();
  81. #endif
  82.